Skip to content

Fix essentials.home.bed permission being ignored#6516

Open
JRoy wants to merge 1 commit intoEssentialsX:2.xfrom
JRoy:fix/5963-home-bed-permission
Open

Fix essentials.home.bed permission being ignored#6516
JRoy wants to merge 1 commit intoEssentialsX:2.xfrom
JRoy:fix/5963-home-bed-permission

Conversation

@JRoy
Copy link
Copy Markdown
Member

@JRoy JRoy commented Apr 12, 2026

Two paths bypassed the permission check:

  1. Explicit /home bed: the permission check at line 44 was combined
    with the bed-spawn logic in a single condition. When denied, it
    fell through to goHome("bed") which found the stored bed home
    by name and teleported anyway. Now rejects immediately.

  2. Fallback respawn: when a player has no homes and isSpawnIfNoHome
    is true, respawn() was called unconditionally which tries the bed.
    Now checks the permission and falls back to world spawn when denied.

Fixes #5963

Two paths bypassed the permission check:

1. Explicit /home bed: the permission check at line 44 was combined
   with the bed-spawn logic in a single condition. When denied, it
   fell through to goHome("bed") which found the stored bed home
   by name and teleported anyway. Now rejects immediately.

2. Fallback respawn: when a player has no homes and isSpawnIfNoHome
   is true, respawn() was called unconditionally which tries the bed.
   Now checks the permission and falls back to world spawn when denied.

Fixes EssentialsX#5963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The "essentials.home.bed" permission is ignored

1 participant